home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / util / cli / AKCC.lha / Programmers / Examples / FPrintf.c < prev    next >
C/C++ Source or Header  |  2002-06-27  |  1KB  |  51 lines

  1. /*
  2. **      $VER: AssignName 37.1 (6.9.96)
  3. **
  4. **      Demonstrates usage of AKCC_FPrintf()
  5. **
  6. **      (C) Copyright 1989-96 Andreas R. Kleinert
  7. **      All Rights Reserved.
  8. */
  9.  
  10.  
  11. #define __USE_SYSBASE
  12.  
  13. #include <akccplus/akccplus_all.h>
  14. #include <proto/akccplus.h>
  15.  
  16. #include <stdlib.h>
  17.  
  18. #include <proto/exec.h>
  19. #include <proto/dos.h>
  20.  
  21.  
  22. struct AKCCPlusBase *AKCCPlusBase = N;
  23.  
  24. void main(long argc, char **argv)
  25. {
  26.  AKCCPlusBase = (struct AKCCPlusBase *) OpenLibrary("akccplus.library", 37);
  27.  if(AKCCPlusBase)
  28.   {
  29.    char parsed_string[256];
  30.    ULONG fp_args[2];
  31.  
  32.    AKCC_FPrintf(Output(), "\nFPrintf V37.1, FREEWARE, (c) 1993-96 by Andreas R. Kleinert.\n", N);
  33.  
  34.    AKCC_ParseText("\nAll output is done via the \\B\\U%s\\N function"
  35.                   "\ninstead of printf() and is parsed through the"
  36.                   "\n\\B\\U%s\\N function for styling.\n", parsed_string);
  37.  
  38.    fp_args[0] = (ULONG) "AKCC_FPrintf()";
  39.    fp_args[1] = (ULONG) "AKCC_ParseText()";
  40.  
  41.    AKCC_FPrintf(Output(), parsed_string, &fp_args[0]);
  42.  
  43.    CloseLibrary((APTR) AKCCPlusBase);
  44.   }else
  45.   {
  46.    puts("\n Can't open \42akccplus.library\42 V37+ !\n");
  47.   }
  48.  
  49.  exit(0);
  50. }
  51.